//  原版权信息 LAC v3 

//  修改者:
//  Copyright (c) 2025 刘子瑶
//  所属单位: 中国科学院信息工程研究所网络空间安全防御重点实验室
//           Key Laboratory of Cyberspace Security Defense, Institute of Information Engineering, CAS
//           中国科学院大学网络空间安全学院
//           School of Cyber Security, University of Chinese Academy of Sciences     

//  modification: added functions `polar_ecc_enc` and `polar_ecc_dec` to implement polar code encoding and decoding

#include "polar.h"
#include "ecc.h"
#include <string.h>
#include <stdlib.h>

//error corretion encode(polar)
int polar_ecc_enc(uint8_t *d) // d:source sequence 
{
	/* polar */
	encode_polar(d);
	
	return 0;
}

//error corrction decode(polar)
int polar_ecc_dec(uint8_t *d, const float *c) // d:estimated message c:LLR of the received signal
{
	/*polar*/
	decode_polar(d, c);
	
	return 0;
}